<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../struts_taglib.jsp"%>
<%@ page import="java.io.PrintWriter"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<jsp:directive.page import="com.xx.pmis.web.util.BarChart" />
<html:html lang="true">
  <head>  
    <title>礼品/数据分析</title>
    <%@ include file="../link_script.jsp" %>
    	<%
			BarChart barChart = new BarChart();
			//饼状图 
			String fileNamePie = barChart.generatePieChart("商店购买情况图" ,session,
					new PrintWriter(out), 580, 300);
			String graphURLPie = request.getContextPath()
					+ "/servlet/DisplayChart?filename=" + fileNamePie;
			//柱状图 
			String fileNameBar = barChart.generateBarChart("每月礼品花费图@月份@金额/元", session,
					new PrintWriter(out), 580, 300);
			String graphURLBar = request.getContextPath()
					+ "/servlet/DisplayChart?filename=" + fileNameBar;
		%>
		<script type=text/javascript>                                                         
<!--
// 
// 

var ie5 = (document.all && document.getElementsByTagName);
var step = 0;
function setSB(v, el, inforEl, message) {
if (ie5 || document.readyState == "complete") {
filterEl = el.children[0];
valueEl = el.children[1];

if (filterEl.style.pixelWidth > 0) {
var filterBackup = filterEl.style.filter;
filterEl.style.filter = "";
filterEl.style.filter = filterBackup;
}

filterEl.style.width = v + "%";
valueEl.innerText = v + "%";
inforEl.innerText = message;
}
}
function setSBByStep(v, el, inforEl, message) {
if (ie5 || document.readyState == "complete") {
step = step + v;
filterEl = el.children[0];
valueEl = el.children[1];

if (filterEl.style.pixelWidth > 0) {
var filterBackup = filterEl.style.filter;
filterEl.style.filter = "";
filterEl.style.filter = filterBackup;
}

filterEl.style.width = step + "%";
valueEl.innerText = step + "%"
inforEl.innerText = message;
}
}

function fakeProgress(v, el) {
if (v >= 101)
location.href="/";
else {
setSB(v, el, infor, "xyBBS   加载中……");
window.setTimeout("fakeProgress(" + (v + 1) + ", document.all['" + el.id + "'])", 20);
}
}

//-->
</script>
		

  </head>
  
<body onload="fakeProgress(0,sb)">
 
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <%@ include file="../operate_button_add.jsp" %>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background="images/tab_12.gif">&nbsp;</td>
        <td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#b5d6e6">       
          <tr>
            <td class="STYLE1" bgcolor="#FFFFFF"><table width="100%" border="0" bordercolor="#b5d6e6" cellpadding="0" cellspacing="0">
              <tr>
                <td class="STYLE3" height="22" bgcolor="#FFFFFF" width="100%">
                <img src="<%=graphURLPie%>" width="38%" height=300><img src="<%=graphURLBar%>" width="60%" height=300></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
        <td width="8" background="images/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <%@ include file="../no_page.jsp"%>
</table>
</body>
</html:html>
